Skip to content

feat(runner): switch a task session to the other agent (TM-977 B2) - #933

Merged
acrossoffwest merged 7 commits into
masterfrom
feat/tm-977-switch-core
Nov 16, 2026
Merged

acrossoffwest merged 7 commits into
masterfrom
feat/tm-977-switch-core

Conversation

@acrossoffwest

Copy link
Copy Markdown
Collaborator

Second part of TM-977 stage B, stacked on #932 (B1). Merge #932 first; this PR then applies cleanly to master.

  • New tmgr runner switch-agent [--to claude-code|codex] [-y] (experimental). It checks the session (local-workspace task, not from a link, queue or team), plans the new run, stops the old session with the reason 'handed to ', reads the old conversation from the run's home, builds the handoff note and starts the other agent in the same task clone through the existing gated create path. The note is the run bundle's body, so it reaches the agent as the first message.
  • Old run: finished as cancelled with 'handed to ' (kill reason). New run: parent_session on the run request, sent as parent_session_id on the first agent-work update. Session info gains handoff_from for chains; the note lists earlier sessions.
  • A masked copy of the old (and earlier) conversations is written into the new run's home so tmgr session finds them there; lookup roots stay the two session folders (or a run home).
  • New agent starts in the default (ask) permission mode in the sandbox, never carrying bypass or no-sandbox over.
  • Needs the task to be in a local workspace (tmgr run is local-only by owner decision). Not covered by an end-to-end test (needs real agent logins); unit tests cover target choice, refusals, chain walk, the parent id on the agent-work update, masked export and lookup.
  • CLI version 1.0.131 and changelog (covers B1 too).

@acrossoffwest
acrossoffwest changed the base branch from feat/tm-977-runner-switch to master November 16, 2026 08:33
@acrossoffwest
acrossoffwest merged commit 1bd2bfc into master Nov 16, 2026
16 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant